<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>积分卡列表</title>
    <link href="/yidongadmin/Application/Admin/View//Public/static/css/bootstrap.css" rel="stylesheet">

    <link href="/yidongadmin/Application/Admin/View//Public/static/css/sb-admin.css" rel="stylesheet">
    <link rel="stylesheet" href="/yidongadmin/Application/Admin/View//Public/static/font-awesome/css/font-awesome.min.css">
    <link rel="stylesheet" href="/yidongadmin/Application/Admin/View//Public/static/css/style.css">
    <style type="text/css">
    th,td{
        text-align: center;
    }
    .forbid{
      color: red;
    }
    .normal{
      color: #28a745;
    }
</style>
</head>

<body>

<div id="wrapper">
    <!-- Sidebar -->
    <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <!--<span style="line-height:50px;background:#dc3545;padding:5px 10px;color:white;"><a href="admin.php" target=_blank style="color:white;font-size:12px;"><i class="fa fa-home"></i> 网站首页</a> </span>-->
           <span >
               <!--<a href='javascript:;' style="color:white;font-size:12px;"><i class="fa fa-trash"></i>  清空缓存</a>-->
            <a class="navbar-brand" href="<?php echo U('index/index');?>">鑫满积分充值系统</a>
           </span>
        </div>

        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse navbar-ex1-collapse">

            <ul class="nav navbar-nav side-nav">
    <li class="dropdown"><a href="<?php echo U('index/index');?>"><i class="fa fa-dashboard"></i> 系统信息</a></li>

    <li class="dropdown"><a href="<?php echo U('Users/index');?>"><i class="fa fa-edit"></i> 生成前台账号</a></li>
    <li class="dropdown"><a href="<?php echo U('Category/index');?>"><i class="fa fa-edit"></i> 生成积分卡</a></li>
    <!--<li class="dropdown"><a href="<?php echo U('Money/index');?>"><i class="fa fa-edit"></i>充值提现记录管理</a></li>-->
     <!--<li class="dropdown"><a href="<?php echo U('banner/index');?>"><i class="fa fa-edit"></i> 轮播图管理</a></li>-->
     <!--<li class="dropdown"><a href="<?php echo U('gp/index');?>"><i class="fa fa-edit"></i> 会员费</a></li>-->
    <!--<li class="dropdown"><a href="<?php echo U('industry/index');?>"><i class="fa fa-edit"></i> 行业分类</a></li>-->
    <!-- <li class="dropdown"><a href="<?php echo U('industry/index');?>"><i class="fa fa-edit"></i> 清除缓存</a></li> -->

    <!-- <li class="dropdown"><a href="<?php echo U('Tar/index');?>"><i class="fa fa-edit"></i> 导航栏目</a></li> -->
    <!--<li><a href="<?php echo U('index/index');?>"><i class="fa fa-dashboard"></i> 系统信息</a></li>-->
    <!--<li class="dropdown">-->
        <!--<a href="<?php echo U('Category/index');?>"><i class="fa fa-reorder"></i> 分类管理</a>-->
    <!--</li>-->
    <!--<li class="dropdown">-->
        <!--<a href="<?php echo U('Article/index');?>"><i class="fa fa-edit"></i> 文章管理</a>-->
    <!--</li>-->
    <!--<li class="dropdown">-->
        <!--<a href="<?php echo U('Page/index');?>"><i class="fa fa-file-text-o"></i> 单页管理 </a>-->
    <!--</li>-->

    <!--<li class="dropdown">-->
        <!--<a href="<?php echo U('Member/index');?>"><i class="fa fa-users"></i> 用户管理</a>-->
    <!--</li>-->
    <!--<li class="dropdown">-->
        <!--<a href="<?php echo U('Withdraw/index');?>"><i class="fa fa-money"></i> 提现申请 </a>-->
    <!--</li>-->
    <!--<li class="dropdown
    ">-->
        <!--<a href="<?php echo U('Paylog/index');?>"><i class="fa fa-credit-card"></i> 支付记录 </a>-->
    <!--</li>-->
     <!--<li class="dropdown">-->
        <!--<a href="<?php echo U('Links/index');?>"><i class="fa fa-link"></i> 链接管理</a>-->
    <!--</li>-->
    <!--<li class="dropdown">-->
        <!--<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-cog"></i> 系统设置 <b class="caret"></b></a>-->
        <!--<ul class="dropdown-menu">-->
            <!--<li><a href="<?php echo U('Setting/index');?>">自定义字段</a></li>-->
            <!--<li><a href="<?php echo U('Baksql/index');?>">数据备份</a></li>-->
        <!--</ul>-->
    <!--</li>-->
</ul>


            <ul class="nav navbar-nav navbar-right navbar-user">
                <li class="dropdown user-dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-user"></i> 你好,<?php echo session('username');?> <b class="caret"></b></a>
                    <ul class="dropdown-menu">
                        <!--<li><a href="/admin.php?m=Admin&c=member&a=update&id=<?php echo session('adminId');?>"><i class="fa fa-gear"></i> 设置</a></li>-->
                        
                        <li class="divider"></li>
                        <li><a href="<?php echo U('login/logout');?>"><i class="fa fa-power-off"></i> 退出</a></li>
                    </ul>
                </li>
            </ul>
        </div><!-- /.navbar-collapse -->
    </nav>
    
    <script>
       function clear_cache(){
           $.ajax({
              url:'<?php echo U("index/clear_cache");?>',
              success:function(data){
                console.log(data)
                 if(data == 1){
                    alert('清理成功!');
                 }else{
                    alert('清理失败，请稍后重试!');
                 }
              }
           })
       }
    </script>

<div id="page-wrapper">
    <ol class="breadcrumb">
        <li class="breadcrumb-item">
          <a href="/admin.php">首页</a>
        </li>
        <li class="breadcrumb-item active">积分卡管理</li>
      </ol>
    <div class="row">
        <div class="col-lg-12">
            
        </div>
    </div>
    <div class="row">
        <div class="col-md-6">
            <a href="<?php echo U('category/add');?>" class="btn btn-success">添加积分卡</a>
        </div>
        <div class="col-md-6">
           
        </div>
    </div>
    <table class="table table-hover table-striped">
        <thead>
            <tr>
                <th>编号</th>
                <th>省份</th>
                <th>金额</th>
                <th>数量</th>
                <th>积分</th>
                <th>操作</th>
            </tr>
        </thead>
        <tbody>
        <?php if(is_array($data)): foreach($data as $key=>$v): ?><tr>
                <td><?php echo ($v["id"]); ?></td>
                <td><?php echo ($v["province"]); ?> </td>
                <td><?php echo ($v["money"]); ?> </td>
                <td><?php echo ($v["sum_num"]); ?></td>
                <td><?php echo ($v["score"]); ?></td>

                <td> <a href="<?php echo U('category/delete?id='); echo ($v["id"]); ?>" style="color:red;" onclick="javascript:return del('您真的确定要删除吗？\n\n删除后将不能恢复!');">删除</a></td>
            </tr><?php endforeach; endif; ?>
        </tbody>
    </table>
    <?php echo ($page); ?>
</div>


<!-- JavaScript -->
<script src="/yidongadmin/Application/Admin/View//Public/static/js/jquery-1.10.2.js"></script>
<script src="/yidongadmin/Application/Admin/View//Public/static/js/bootstrap.js"></script>
<script src="/yidongadmin/Application/Admin/View//Public/static/js/app.js"></script>
<script src="/yidongadmin/Application/Admin/View//Public/static/layer/layer.js"></script>

</body>
</html>